import request from '@/utils/request'

// 查询未月结的数据
export function getSalaryMonthEndPage(query) {
  return request({
    url: '/salaryHistoryController/getSalaryMonthEndPage',
    method: 'get',
    params: query
  })
}

// 查询暂存的数据
export function getSalaryMonthEndStopPage(query) {
  return request({
    url: '/salaryHistoryController/getSalaryMonthEndStopPage',
    method: 'get',
    params: query
  })
}

//未月结应发实发合计
// export function getSalaryMonthEndSum(agencyId, isThirteenChange) {
//   return request({
//     url: '/salaryHistoryController/getSalaryMonthEndSum',
//     method: 'get',
//     params: {
//       agencyId,
//       isThirteenChange
//     }
//   })
// }

// 查询月结的数据
export function getSalaryMonthHistoryPage(query) {
  return request({
    url: '/salaryHistoryController/getSalaryMonthHistoryPage',
    method: 'get',
    params: query
  })
}

// 月结
export function saveMonthEnd(data) {
  return request({
    url: '/salaryHistoryController/saveMonthEnd',
    method: 'post',
    data
  })
}
export function getPaymentPercent(query) {
  return request({
    url: '/salaryHistoryController/getPaymentPercent',
    method: 'get',
    params: query
  })
}

// 撤销月结前校验
export function checkRevokeMonthEnd(data) {
  return request({
    url: '/salaryHistoryController/checkRevokeMonthEnd',
    method: 'post',
    params: data
  })
}

// 撤销月结
export function revokeMonthEnd(data) {
  return request({
    url: '/salaryHistoryController/revokeMonthEnd',
    method: 'post',
    data
  })
}
//暂存
export function saveMonthEndStop(data) {
  return request({
    url: '/salaryHistoryController/saveMonthEndStop',
    method: 'post',
    data
  })
}

// 撤销暂存前校验
export function checkRevokeMonthEndStop(data) {
  return request({
    url: '/salaryHistoryController/checkRevokeMonthEndStop',
    method: 'post',
    params: data
  })
}

// 撤销暂存
export function revokeMonthEndStop(data) {
  return request({
    url: '/salaryHistoryController/revokeMonthEndStop',
    method: 'post',
    data
  })
}


// 导出
export function outPutSalaryList(query) {
  return request({
    url: '/outPutSalaryMonthEndList',
    method: 'get',
    responseType: 'blob',
    params: query
  })
}

